//
//  KABTicketDetailTCell.m
//  kabu
//
//  Created by XiangDongMBP on 2017/2/16.
//  Copyright © 2017年 East. All rights reserved.
//

#import "KABTicketDetailTCell.h"
#import "KABModel.h"
#import "SGQRCodeTool.h"

@implementation KABTicketDetailTCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)configViewWithExhOrderDetail:(KABExhOrderDetail *)detail {
    self.ticketNoLabel.text = [NSString stringWithFormat:@"  票号  %@%@  ", detail.serial_number, detail.check_code];
    
    NSString *str = [NSString stringWithFormat:@"%@|%@", detail.serial_number, detail.check_code];
    UIImage *qrImage = [SGQRCodeTool SG_generateWithDefaultQRCodeData:str imageViewWidth:CGRectGetWidth(self.qRCodeImgView.bounds)];
    self.qRCodeImgView.image = qrImage;
}

@end
